package com.springbootstart;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;

@ComponentScan("com.springbootstart")
public class BoostrapApplication {

    public static void main(String[] args) {
        AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext();
        applicationContext.register(BoostrapApplication.class);
        applicationContext.refresh();

        WebServerFactory bean = applicationContext.getBean(WebServerFactory.class);
        bean.createServer();

    }
}
